app.controller('GetOneelectricdataCtrl',function ($scope,$http,$localStorage,$location,$window,$state) {
	$scope.namedata = $localStorage.cur_user.uname;	
	
    $http.post(
        $scope.app.backendurl+"tbl-electricity/view-one",
        {    
            
           'equipment_id':$state.params.did,
            'token':$localStorage.token                  

        }
      ).success(function (data) {
        console.log(data);
        if(data.code==0&&data.msg=="读取成功"){             
          $scope.aaData = data.data.model;                
        }
        if(data.code==1){             
          alert(data.msg)
                
        }
        if(data.code==20001&&data.msg=='请先登录'){
          $location.path('access.signin');
        }  
    
   
    }).error(function(data){
      console.log(data);
    })
	


	

})